package com.huatai.common.util;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * @program: ht-metaverse
 * @description: 分页获取
 * @author: songxiude
 * @create: 2023-08-17 15:21
 **/
public class PaginationUtils {


	public static <T> Page<T> getPage(long page, long size) {

		long pageSize = page > 0 ? page : 1;
		long limit = size > 0 ? size : 10;
		Page<T> ipage = Page.of(pageSize, limit);
		//Page<T> ipage = new Page<T>(pageSize, limit);
		return ipage;
	}
}
